package site.lanmushan.generate;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import site.lanmushan.generate.configs.GenerateCodeConfig;
import site.lanmushan.generate.service.GenerateCodeService;

/**
 * @author Administrator
 */
@SpringBootApplication(scanBasePackages = "site.lanmushan")
public class SlashCommonGenerateApplication implements ApplicationRunner {
    @Autowired
    GenerateCodeService generateCodeService;
    @Autowired
    GenerateCodeConfig config;

    public static void main(String[] args) {
        SpringApplication.run(SlashCommonGenerateApplication.class, args);
    }

    @Override
    public void run(ApplicationArguments args) throws Exception {
        generateCodeService.generate(config);
    }
}
